screenshot.png

<!-- style -->
/*
Theme Name: 
Theme URI: 
Author: ;
Author URI: ;
Description: 
Version: 
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: 
Text Domain: 

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/

<!-- head -->
<?php bloginfo( 'charset' ); ?>
<?php bloginfo(stylesheet_url); ?>
<?php wp_head(); ?>
<?php wp_title('|', true, 'right'); ?><?php bloginfo('name'); ?>
<?php body_class(); ?>
<?php get_header(); ?>


<!-- Logo And menu -->

<?php echo home_url(); ?>

<?php 
wp_nav_menu(array(
	'theme_location' => 'main-menu',
	'container' => '',
	'menu_class' => 'inline'
));
?>

function register_my_menus() {
	register_nav_menus(array(
		'main-menu' => 'Main Menu',
		'social-menu' => 'Social Menu'
	));
}

add_action('init', 'register_my_menus');



<!-- post thumbainl -->
if (function_exists('add_theme_support')) {
	add_theme_support('post-thumbnails');
	set_post_thumbnail_size(369, 227);
}


<!-- Post Loop -->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

<?php endwhile; else : ?>
<p><?php _e( 'متاسفانه مطلبی وجود ندارد' ); ?></p>
<?php endif; ?>



<?php $isOdd = true; ?>
<?php $isOdd = ! $isOdd; ?>
<?php  if($isOdd) echo 'even'; ?>
<!-- blog items -->


<?php echo get_permalink(); ?>
the_post_thumbnail()
<?php the_category() ?>
<?php the_time() ?>
<?php the_title() ?>
<?php the_excerpt() ?>


<!-- Pagination -->
<?php next_posts_link( 'آیتم های بعدی' , $max_pages ); ?> 
<?php previous_posts_link( 'آیتم های قبلی' , $max_pages ); ?> 

add_filter('next_posts_link_attributes', 'posts_link_attributes_1');
add_filter('previous_posts_link_attributes', 'posts_link_attributes_2');

function posts_link_attributes_1() {
    return 'class="next"';
}
function posts_link_attributes_2() {
    return 'class="prev"';
}

<?php next_post_link(); ?> 
<?php previous_post_link(); ?>


add_filter('next_post_link', 'post_link_attributes1');
add_filter('previous_post_link', 'post_link_attributes2');
 
function post_link_attributes1($output) {
    $code = 'class="next"';
    return str_replace('<a href=', '<a '.$code.' href=', $output);
}
function post_link_attributes2($output) {
    $code = 'class="prev"';
    return str_replace('<a href=', '<a '.$code.' href=', $output);
}


		
<!-- sidebar -->
add_action( 'widgets_init', 'theme_slug_widgets_init' );
function theme_slug_widgets_init() {
    register_sidebar( array(
        'name' => __( 'Main Sidebar', 'theme-slug' ),
        'id' => 'sidebar-1',
        'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'theme-slug' ),
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
	'after_widget'  => '</li>',
	'before_title'  => '<h2 class="widgettitle">',
	'after_title'   => '</h2>',
    ) );
}

<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
	<div id="widget-area" class="widget-area" role="complementary">
		<?php dynamic_sidebar( 'sidebar-1' ); ?>
	</div><!-- .widget-area -->
<?php endif; ?>


<!-- post -->
	add_image_size( 'custom-size', 770, 475, true );

if ( has_post_thumbnail() ) { 
    the_post_thumbnail( 'custom-size' ); 
}
<?php the_content() ?>

<!-- Footer -->

<?php wp_footer(); ?>

<?php get_footer(); ?>
